<?php

// Keep track of one global database object
global $db;

// Configure the database connection
$host = 'localhost';
$user = 'root';
$password = 'root';
$database = 'cdia_wv308_oop';

// Assign database instance to our global
$db = new mysqli( $host, $user, $password, $database );

if( $db->connect_errno ) {
	echo 'Failed to connect to MySQL: ' . $db->connect_error;	
}